package com.cy.web;

import com.cy.domain.JSONResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class MyExceptionHandler {
    @ExceptionHandler(Exception.class)
    public JSONResult doTest(Exception e){
        return new JSONResult(0,e.getMessage(),null);
    }
}
